package model;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

/*
@Stateless
public class LudzieDAO {
	@PersistenceContext(name = "WebFilmPU") private EntityManager em;
	
    @SuppressWarnings("unchecked")
	public List<Ludzie> getAll()
    {
    	return em.createNamedQuery("Ludzie.All").getResultList();
    }
    
    public Ludzie check(String log, String pass)
    {
    	Query query = em.createNamedQuery("Ludzie.Check");
    	query.setParameter("login",log);
    	query.setParameter("pass",pass);
    	Object user = query.getSingleResult();
    	return (Ludzie)user;
    }
}
*/